Skip to content

Document same-role permissions for team-based access control - #728

Open
promptless-for-oss wants to merge 4 commits into
mautic:7.2from
Promptless:promptless/same-role-permissions
Open

Document same-role permissions for team-based access control#728
promptless-for-oss wants to merge 4 commits into
mautic:7.2from
Promptless:promptless/same-role-permissions

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Documents the new same-role permission level introduced in PR #15465, which allows users to collaborate on resources with other users sharing the same role while maintaining isolation from users in other roles. Includes practical examples for regional teams and explains how Own, Same Role, and Others permissions combine.

Trigger Events


Tip: Planning a big docs refactor? Use Deep Analysis to get help with the heavy lifting.

Add documentation for the new same-role permission level that allows
users to collaborate on resources within their assigned role while
maintaining isolation from other roles. Includes practical examples
for regional teams and explains how permission levels combine.
Comment thread docs/users_roles/managing_roles.rst Outdated

.. vale off

Using same-role permissions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added new "Using same-role permissions" section based on PR #15465, which introduces viewsamerole, editsamerole, deletesamerole, and publishsamerole permission levels across Assets, Campaigns, Channels, Dynamic Content, Emails, Forms, Landing Pages, Reports, and Segments. The Italy/Germany team example comes directly from the PR description.

Source: mautic/mautic#15465

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions

Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
- Capitalize "Same Role" consistently throughout section
- Add vale off/on wrappers around section headings
- Add vale off/on around company example (general usage)
- Use #. instead of numbers for ordered lists per Mautic style
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review, @adiati98! I've applied all 8 suggestions:

  • Capitalized "Same Role" consistently throughout the section
  • Added .. vale off/on wrappers around section headings and the company example paragraph
  • Converted numbered lists from 1. 2. 3. to RST-style #. format per the Mautic style guide

The changes have been pushed to the branch. Ready for re-review!

Comment thread docs/users_roles/managing_roles.rst Outdated
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Good catch! Looking at the content, the section lists the areas of Mautic where Same Role permissions apply (Assets, Campaigns, Emails, etc.), not temporal conditions. "Where" is the correct choice here since we're describing locations/areas in the product.

I'll update the heading to "Where Same Role permissions apply" along with the other review suggestions.

The section lists areas/locations in Mautic where Same Role permissions
apply, not temporal conditions, so 'Where' is the correct word choice.
* Reports
* Segments

For each area, you can set **View Same Role**, **Edit Same Role**, **Delete Same Role**, and **Publish Same Role** permissions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andersonjeccel I believe we're now using 'Activate or Turn On' instead of 'Publish' as per Vale warning here? Although Publish Same Role is correct in terms of how it renders on the UI, Vale will always warn us about the correct term to use and this has been inconsistent throughout the docs.

I'm wondering, is there any plan to update the UI in the near future? Or how should we address this in the docs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@escopecz do you have any thoughts on this one?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we are still using the "publish" word in the permission for all the entities. I'm not sure how to deal with that. Perhaps update them to be the same as the button for each entity?

@andersonjeccel

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Good question, @adiati98. Since "Publish Same Role" matches the current UI label, I've kept it as-is for now. Happy to update to "Activate Same Role" or another term once there's guidance on how to handle the UI/docs terminology inconsistency.

Let me know what you'd prefer and I'll make the change.

@adiati98 adiati98 added this to the Mautic 7.2 milestone May 31, 2026
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @escopecz. Quick verification from the 7.x code to ground this:

The Roles Permissions screen renders these as a single shared set of permission-level columns — View / Edit / Create / Delete / Publish — the same across every entity (Assets, Campaigns, Emails, etc.). They come from the shared mautic.core.permissions.* labels (publish="Publish", publishown="Publish Own", publishother="Publish Others"), and PR #15465 follows that pattern with publishsamerole="Publish Same Role". So the docs currently match exactly what the permissions UI shows.

That's a different surface from each entity's primary action button, which is why the permissions column stays "Publish" even where an entity's own button reads differently — the permissions screen isn't labeled per-entity.

The open question (raised earlier by @adiati98) is docs house-style vs. the literal UI: our Vale rule maps publish → "Activate or Turn On", and the rest of managing_roles.rst already uses "Activate/Active". So we can either (a) keep "Publish Same Role" to mirror the actual UI labels verbatim, or (b) apply the house-style wording ("Activate Same Role") for consistency with the rest of the page — but option (b) would then read differently from the on-screen label.

Since this is really a naming/UX call (and possibly a UI-label change — #15465 is still open against 7.x, so the labels could still change before merge), how would you and @andersonjeccel like to standardize it? Once you decide, we'll update the section to match.

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@promptless-for-oss please address the suggestions.

Comment thread docs/users_roles/managing_roles.rst
Comment thread docs/users_roles/managing_roles.rst
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Comment thread docs/users_roles/managing_roles.rst Outdated
Address @adiati98 review feedback on PR mautic#728:
- Wrap UI-term lines (Publish Same Role, etc.) in vale off/on guards
- Quote 'Same Role' in section headings and fix underline lengths
- Use 'send' for Emails in regional team example bullets
- Bold Own and Others in Combining permission levels intro
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @adiati98 — I've addressed all seven review suggestions and pushed the changes:

  1. Wrapped the "For each area..." sentence in .. vale off / .. vale on so the UI terms (View Same Role, Edit Same Role, Delete Same Role, Publish Same Role) stay verbatim.
  2. Wrapped the regional-team numbered list (create Italy/Germany Roles, enable Same Role permissions) in .. vale off / .. vale on.
  3. Italian Users bullet: changed "publish" → "send".
  4. German Users bullet: changed "publish" → "send".
  5. Section heading → Using 'Same Role' permissions.
  6. Subsection heading → Where 'Same Role' permissions apply.
  7. Bolded Own and Others in the "checks permissions in this order" sentence.

Per your "keep the UI term as is" note, the literal product labels (including Publish Same Role) are preserved and Vale is satisfied via the .. vale off/.. vale on guards rather than rewording. I corrected the two heading underline lengths to match the heading text per RST rules. Vale now reports 0 errors / 0 warnings on docs/users_roles/managing_roles.rst.

@adiati98

Copy link
Copy Markdown
Contributor

@andersonjeccel, can you please review the content in this PR? TIA! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants